<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
          
 <html xmlns="http://www.w3.org/1999/xhtml" 
 	   xmlns:ui="http://java.sun.com/jsf/facelets"
 	   xmlns:f="http://java.sun.com/jsf/core" 
	   xmlns:h="http://java.sun.com/jsf/html"
	   xmlns:t="http://myfaces.apache.org/tomahawk">
 	<body>
 	<!-- common menu for all pages -->
 	<ui:composition >
		<t:panelGrid  columns="2">
			<t:outputText value="Product name" />
			<t:panelGroup>
				<t:inputText id="name" label="name" value="#{manageProductsBean.name}" required="true" >
					<f:validateLength minimum="2" maximum="25" />
				</t:inputText>
				<t:message for="name" errorStyle="color:red; text-decoration:overline" />	
			</t:panelGroup>
			<t:outputText value="Version" />
			<t:panelGroup>
				<t:inputText id="version" label="version" value="#{manageProductsBean.version}" required="true">
					<f:validateLength minimum="1" maximum="25" />
				</t:inputText>
				<t:message for="version" errorStyle="color:red; text-decoration:overline" />
			</t:panelGroup>
			<t:outputText value="Description" />
			<t:outputText value="" />
			<t:panelGroup>
				<t:inputTextarea id="description" label="description" value="#{manageProductsBean.description}">
					<f:validateLength minimum="0" maximum="500" />
				</t:inputTextarea>
				<t:message for="description" errorStyle="color:red; text-decoration:overline" />
			</t:panelGroup>
			<t:outputText value="" />
			<t:commandButton action="#{manageProductsBean.createProduct}" value="create"></t:commandButton>
			<t:commandButton action="productsList" value="cancel" immediate="true"></t:commandButton>
		</t:panelGrid>
   </ui:composition>
	</body>
 </html>